import React, { useState, useEffect } from 'react'
import { reqBanner } from '../../../request/api'
export default function Banner() {
    let [arr, setArr] = useState([])
    useEffect(() => {
        reqBanner().then(res => {
            setArr(res.list)
        })
    }, [])
    return (
        <ul>
            {
                arr.map(item => {
                    return (
                        <img className="banner_img" key={item.id} src={item.img} alt="" />
                    )
                })
            }
        </ul>

    )
}
